package com.cxria.pattern.memento.func2

class Originator2 implements Cloneable {

    Originator2 backup

    String state = ''

    Originator2 createMemento(){
        backup = clone()
    }

    void restoreMemento(){
        state = backup.state
    }

}